<?php
require_once("TVB/PWORKS/message/Messager.class.php");
$messager = new Messager();

$error = $action->getErrors();
$json_data  = array();

if ( $error != null )
{
    foreach ($error as $err_num => $err)
    {
        foreach ($err as $value)
        {
            $json_data[] = $value;
        }
    }
}
echo (json_encode($json_data));

?>
